<!--带货任务列表-->
<template>
  <view class="plan-list">
    <view class="line">
      <view class="left">
        <u-image height="34rpx" width="28rpx" src="@/static/images/Paper@2f.png"></u-image>
        {{$t('anchorConsole.CarryingTaskList') }}
      </view>
      <text
          @click="$u.route('/pages/storyType/storeManagement/batchorders',{type:'anchor'})">{{$t('anchorConsole.all') }}
      </text>
    </view>
    <!--带货任务列表-->
    <view class="info">
      <view class="li" v-for="item in sellTaskList" :key="item.id"
            @click="$u.route('/pages/anchorConsole/page/taskDetails',{type:'applyKb',taskId:item.id})">
        <view class="left">
          <text>{{ item.taskName }}</text>
        </view>
        <view class="right">

					{{publicJS.timeZoneSwitching(item.createTime)}}
          <view>
            {{$t('anchorConsole.incomingTask') }}
            <u-icon name="arrow-rightward"></u-icon>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      //带货任务列表
      sellTaskList: [],
      paging: {
        pageSize: 999,
        pageNum: 1
      },
    };
  },
  mounted() {
    this.getSellTaskList(this.paging);
  },
  methods: {
    //获取带货任务列表
    getSellTaskList(paging) {
      this.$u.post('/app/anchor/sell/task/anchorSellTaskList', paging).then(res => {
        console.log('带货任务列表', res);
        this.sellTaskList = [...this.sellTaskList, ...res.data.records].filter(function(
            element, index,
            self) {
          return self.findIndex(el => el.id == element.id) === index
        })
        this.total = res.data.total
      })
    },
  },
}
</script>

<style lang="scss" scoped>
.anchor-console-page {
  .top {
    padding: 56rpx;

    .title {
      display: flex;
      justify-content: space-between;

      uni-text {
        font-size: 72rpx;
        font-weight: 400;
        color: #02010E;
      }
    }

  }

  .user {
    display: flex;
    justify-content: space-between;

    margin-bottom: 50rpx;

    .info {
      display: flex;
      align-items: center;
      color: #02010E;
      justify-content: space-between;
      width: 100%;

      .infoName {
        font-size: 48rpx;
        font-family: Avenir-Heavy-Regular, Avenir-Heavy;
        font-weight: 400;
        color: #02010E;
        margin-left: 22rpx;
        line-height: 58rpx;
      }

      .u-avatar {
        margin-bottom: 20rpx;

      }
    }
  }

  .bank-card {
    width: 100%;
    padding: 44rpx 48rpx;
    background: #FFFFFF;
    box-shadow: 6rpx 10rpx 44rpx 0rpx rgba(0, 0, 0, 0.1);
    border-radius: 32rpx 32rpx 32rpx 32rpx;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .left {
      color: #91909A;
      font-size: 36rpx;
      display: flex;
      align-items: center;

      .u-image {
        margin-right: 18rpx;
      }
    }

    .right {
      font-size: 48rpx;
    }
  }

  .t-card {
    display: flex;
    justify-content: space-between;
    margin: 40rpx 0;

    .card {
      width: 49%;
      padding: 36rpx;
      background: linear-gradient(90deg, #F9934A 0%, #FBC47A 100%);
      box-shadow: 6rpx 10rpx 44rpx 0rpx rgba(0, 0, 0, 0.1);
      border-radius: 32rpx 32rpx 32rpx 32rpx;
      opacity: 1;
      color: #fff;
      font-size: 32rpx;

      .u-image {
        margin-bottom: 18rpx;
      }

      &:nth-child(2) {
        background: linear-gradient(90deg, #2934D0 0%, #92A6F7 100%);
        box-shadow: 6rpx 10rpx 44rpx 0rpx rgba(0, 0, 0, 0.1);
      }
    }
  }

  .echarts {
    width: 100%;
    background: #FFFFFF;
    box-shadow: 6rpx 10rpx 44rpx 0rpx rgba(0, 0, 0, 0.1);
    border-radius: 32rpx 32rpx 32rpx 32rpx;
    opacity: 1;
    padding: 56rpx 24rpx;

    .date {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 50rpx;

      uni-text {
        width: 90%;
        color: #91909A;
        font-size: 32rpx;
      }

      /deep/ .uni-stat__select {
        flex: unset;
        width: unset;
      }

      /deep/ .uni-select {
        width: 320rpx;
        border: 1px solid #4953ED;

        .uni-select__input-text {
          color: #4953ED;
        }

        .uni-icons {
          color: #4953ED !important;
        }
      }
    }

    .charts-box {
      width: 100%;
      height: 500rpx;
      flex: 1;

      .charts {
        height: 100%;
        width: 100%;
      }
    }
  }

  .button-group {
    margin: 40rpx 0;
    font-size: 32rpx;

    .u-btn {
      width: 100%;
      background: #2934D0;
      border-radius: 20rpx 20rpx 20rpx 20rpx;
      opacity: 1;
      margin-bottom: 20rpx;
      padding: 38rpx 94rpx;
      color: #fff;
      box-shadow: 6rpx 10rpx 44rpx 0rpx rgba(0, 0, 0, 0.1);

      /deep/ uni-image {
        position: absolute;
        right: 20rpx;
      }

      &:nth-child(2) {
        background: #FFFFFF;
        color: #91909A;

      }
    }
  }

  .plan-list {
    padding-bottom: 48rpx;

    .line {
      display: flex;
      justify-content: space-between;
      margin-bottom: 28rpx;

      .left {
        font-size: 32rpx;
        display: flex;
        align-items: center;

        .u-image {
          margin-right: 18rpx;
        }
      }

      uni-text {
        font-size: 22rpx;
        color: #2934D0;
      }
    }

    .info {
      font-size: 24rpx;

      .li {
        display: flex;
        justify-content: space-between;
        border-radius: 16rpx 16rpx 16rpx 16rpx;
        border: 2rpx solid #E1E8E8;
        padding: 24rpx;
        margin-bottom: 20rpx;

        .left {
          flex: 1;
        }

        .right {
          width: 410rpx;
          display: flex;
          justify-content: space-between;
          color: #2934D0;

          .u-icon {
            margin-left: 20rpx;
          }

          uni-text {
            &:nth-child(1) {
              color: #666666;
            }

          }
        }
      }
    }
  }

  .head-right-font {
    position: relative;
    font-size: 30rpx;
    color: #9999FF;
    font-weight: 800;

    :after {
      position: absolute;
      bottom: -8rpx;
      width: 30%;
      height: 6rpx;
      background: #CCCCFF;
      content: '';
      left: 50%;

      transform: translateX(-50%);
      box-shadow: 0 0 80rpx 40rpx rgba(0, 0, 255, .2);
    }
  }


  .box_allo_say {
    height: 300rpx;
    width: 750rpx;
    padding-top: 40rpx;
    background: #ffffff;
    border-radius: 50rpx 50rpx 0rpx 0rpx;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    .box_goods_live {
      height: 100rpx;
      width: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .box_happy_live {
      height: 100rpx;
      width: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
    }

  }

}
</style>
